#include <AVUIGeometry.h>

namespace AVUI {

class PathFigureCollection;
class PathGeometry : public Geometry
{
public:
    DECLARE_ELEMENT(PathGeometry, Geometry);

    DECLARE_DEPENDENCY_PROPERTY(FillRule);
    FillRule::Enum get_FillRule() { return (FillRule::Enum)(AVUI::UnboxValue<int>(GetValue(get_FillRuleProperty()))); }
    void set_FillRule(FillRule::Enum value) { SetValue(get_FillRuleProperty(), AVUI::BoxValue<int>(value)); } 

    DECLARE_DEPENDENCY_PROPERTY_BEGIN(Figures);
        DECLARE_ATTRIBUTE_CONTENTPROPERTY();
        DECLARE_ATTRIBUTE_AUTOCREATE();
    DECLARE_DEPENDENCY_PROPERTY_END();
    TRefCountedPtr<PathFigureCollection> get_Figures() { return (PathFigureCollection*)(Object*)GetValue(get_FiguresProperty()); }
    void set_Figures(PathFigureCollection* pValue) { SetValue(get_FiguresProperty(), (Object*)pValue); } 

    virtual Rect GetBounds();
    virtual bool HitTest(const Point& pt, int hitTestFlags, float strokeThickness);

protected:
    virtual TRefCountedPtr<Freezable> CreateInstanceCore() AVUI_OVERRIDE { return object_allocate<PathGeometry>().get_Ptr(); }

private:
    static void StaticConstructor();

    virtual void BuildGeometry(GeometryBuilder* pGB);
    void BuildGeometryCommon(GeometryBuilder* pGB);
};


}; // namespace AVUI
